package com.yike.user.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yike.common.pagination.BasePageOrderParam;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * 销售报表参数
 *
 * @author Sakura
 * @since 2024-11-18
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "销售报表参数")
public class PlatformReportDataParam extends BasePageOrderParam {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("店铺ID")
    private Long shopId;

    @ApiModelProperty("代理商ID")
    private Long agentId;

    @ApiModelProperty("分类ID")
    private Long categoryId;

    @ApiModelProperty(value = "开始时间 yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String beginTime;

    @ApiModelProperty(value = "结束时间 yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private String endTime;

    @ApiModelProperty("省code")
    private String provCode;

    @ApiModelProperty("市code")
    private String cityCode;

    @ApiModelProperty("区code")
    private String distCode;

    @ApiModelProperty("销售排序：1畅销 2滞销")
    private Integer salesSort = 1;

    public void setSalesSort(Integer salesSort) {
        if (salesSort == null) {
            salesSort = 1;
        }
        this.salesSort = salesSort;
    }

}
